import java.util.*;

public class Main
{
    public static void main(String []args)
    {
	try
	{
	    Scanner in = new Scanner(System.in);
	    Random al1 = new Random();
	    Random al2 = new Random();
	    int N = in.nextInt();
	    double Gauss[][] = new double [N][2];
	    for (int i = 0; i < N; ++i)
	    {
		double a1 = al1.nextDouble(), a2 = al2.nextDouble();
		Gauss[i][0] = Math.sqrt( - 2.0 * Math.log(a1)) * Math.cos(2 * Math.PI * a2);
		Gauss[i][1] = Math.sqrt( - 2.0 * Math.log(a1)) * Math.sin(2 * Math.PI * a2);
	    }
	    double e1 = 0, e2 = 0, d1 = 0, d2 = 0;
	    for (double [] x: Gauss)
	    {
		e1 += x[0];
		e2 += x[1];
	    }
	    e1 /= N;
	    e2 /= N;
	    for (double []x: Gauss)
	    {
		d1 += Math.pow(e1 - x[0], 2.0);
		d2 += Math.pow(e2 - x[0], 2.0);
	    }
	    d1 /= N - 1;
	    d2 /= N - 1;
	    System.out.println(e1 + "\t" + e2);
	    System.out.println(d1 + "\t" + d2);
	    
	}
	catch(Throwable e){System.out.println(e.getMessage());}
    }

}